/**
 * 
 */
package com.realgodo.site.utils;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.apache.struts2.views.freemarker.ScopesHashModel;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * @author luke
 * 
 */
public class CustomFreemarkerManager extends FreemarkerManager {

	private Map utils;  

	protected void populateContext(ScopesHashModel model, ValueStack stack,
			Object action, HttpServletRequest request,
			HttpServletResponse response) {
		super.populateContext(model, stack, action, request, response);
		model.putAll(utils);
	}

	public void setUtils(Map utils) {
		this.utils = utils;
	}
}
